<% content_for :page_head do %>
  <h1><%= @project.name %> Issues(<%= trans_current_state_to_chs(@project.state) %>)</h1>
<% end %>

<% content_for :right_side do %>

  <div id="the_other_control">
    <%= link_to image_tag("add_icon.gif"), new_project_issue_path(:project_id => params[:project_id] || params[:id]), :class=>"image"%>
    <%= link_to "创建Issue", new_project_issue_path(:project_id => params[:project_id] || params[:id]), :class=>"grey" %>
  </div>
  
  <div id="the_other_control">
    <%= link_to image_tag("add_icon.gif"), new_project_requirement_path(:project_id => params[:project_id] || params[:id]), :class=>"image"%>
    <%= link_to "创建需求", new_project_requirement_path(:project_id => params[:project_id] || params[:id]), :class=>"grey" %>
  </div>

<% if current_user.has_role?("admin") || current_user.has_role?("pdm") %>
  <h2>对该项目进行操作</h2>
  <div id="the_other_control">
    <%= link_to image_tag("import_icon.gif"), change_state_project_path, :class=>"image"%>
    <%= link_to get_project_state_op(@project.state), change_state_project_path, :class=>"grey" %>
  </div>

  <% if current_user.has_role?("admin") || current_user.has_role?("pdm") %>
  <div id="the_other_control">
    <%= link_to image_tag("import_icon.gif"), edit_project_path, :class=>"image"%>
    <%= link_to "编辑项目信息", edit_project_path, :class=>"grey" %>
  </div>
  <% end %>
<% end %>
  
  <br/>
  <div id="the_other_control">
    <%= link_to image_tag("download.gif"), export_csv_project_path, :class=>"image"%>
    <%= link_to "导出Issue列表到Excel(CSV)", export_csv_project_path, :class=>"grey" %>
  </div>

  <br/><br/>
  <div id="the_other_control">
    <%= @project.description %>
  </div>
<% end %>


<% unless @issues.empty? %>
  <div id="issue_list">
    <%=  render :partial => "issues_list" %>
  </div>
<% end %>